<?php
include("../config.php");
$encode = base64_encode($_SERVER["REMOTE_ADDR"]);
$json = json_decode(file_get_contents("./Cache/admin.txt"),true);
$Cache_pwd=$json[$encode]?$json[$encode]:"0";
if($Cache_pwd<time())
{
exit("<script language='javascript'>alert('请先登陆！');window.location.href='./login.php';</script>");
}
?>

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title><?php echo $web["ming"]; ?>API - 审核友链</title>
<link rel="icon" href="http://q2.qlogo.cn/headimg_dl?dst_uin=<?php echo $web["qq"]; ?>&spec=5" type="image/ico">
<meta name="keywords" content="<?php echo $web["keywords"]; ?>">
<meta name="description" content="<?php echo $web["description"]; ?>">
<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  
<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
<?php require_once("./head.php")?>
    <!--页面主要内容-->
    <main class="lyear-layout-content">
      
      <div class="container-fluid">
        
        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-toolbar clearfix">


              <div class="card-header">
                <h4>审核友链列表</h4>
              </div>

              </div>
              <div class="card-body">
                
                <div class="table-responsive">
                  <table class="table table-bordered">
                    <thead>
                      <tr>
                        <th>
                          <label class="lyear-checkbox checkbox-primary">
                            <input type="checkbox" id="check-all"><span></span>
                          </label>
                        </th>
                        <th>网站名称</th>
                        <th>网站链接</th>
                        <th>操作</th>
                      </tr>
                    </thead>
                    <tbody>
<?php
$data = file_get_contents("./youqing/youqing.php");
$result = preg_match_all("/『名字：(.*?)』『链接：(.*?)』『介绍：(.*?)』『QQ：(.*?)』『状态：审核中』/",$data,$nute);
for ($x=0; $i < $result && $i<=$result; $i++)
{
$name=$nute[1][$i];//网站名称
$dz=$nute[2][$i];//网站链接
$jieshao=$nute[3][$i];//网站介绍
$user=$nute[4][$i];//联系方式
echo '<tr><td><label class="lyear-checkbox checkbox-primary"><input type="checkbox" name="ids[]" value="1"><span></span></label></td><td>'.$name.'</td><td>'.$dz.'</td><td><div class="btn-group"><a class="btn btn-xs btn-default" type="button" href="./youqing/shanchush.php?ming='.$name.'&url='.$dz.'&jieshao='.$jieshao.'&user='.$user.'&qq='.$config["config"]["admin_pass"].'" data-toggle="tooltip" title="删除"><i class="mdi mdi-pencil"></i></a><a class="btn btn-xs btn-default" type="button" href="./youqing/tongguo.php?ming='.$name.'&url='.$dz.'&jieshao='.$jieshao.'&user='.$user.'&qq='.$config["config"]["admin_pass"].'" title="通过" data-toggle="tooltip"><i class="mdi mdi-eye"></i></a></div></td></tr>';
}
?>
                      
                    </tbody>
                  </table>
                </div>


              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      <!--结束-->
            
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>

</body>
</html>